home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / minivadr.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  3KB  |  98 lines

  1. /***************************************************************************
  2.  
  3. Minivader (Space Invaders's mini game)
  4. (c)1990 Taito Corporation
  5.  
  6. Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/12/19 -
  7.  
  8. This is a test board sold together with the cabinet (as required by law in
  9. Japan). It has no sound.
  10.  
  11. ***************************************************************************/
  12.  
  13. #include "driver.h"
  14. #include "vidhrdw/generic.h"
  15. #include "cpu/z80/z80.h"
  16.  
  17.  
  18. WRITE_HANDLER( minivadr_videoram_w );
  19. void minivadr_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  20. void minivadr_init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom);
  21.  
  22.  
  23. static struct MemoryReadAddress readmem[] =
  24. {
  25.     { 0x0000, 0x1fff, MRA_ROM },
  26.     { 0xa000, 0xbfff, MRA_RAM },
  27.     { 0xe008, 0xe008, input_port_0_r },
  28.     { -1 }  /* end of table */
  29. };
  30.  
  31. static struct MemoryWriteAddress writemem[] =
  32. {
  33.     { 0x0000, 0x1fff, MWA_ROM },
  34.     { 0xa000, 0xbfff, minivadr_videoram_w, &videoram, &videoram_size },
  35.     { 0xe008, 0xe008, MWA_NOP },        // ???
  36.     { -1 }  /* end of table */
  37. };
  38.  
  39.  
  40. INPUT_PORTS_START( minivadr )
  41.     PORT_START
  42.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  43.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  44.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
  45.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
  46.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  47.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  48.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  49.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  50. INPUT_PORTS_END
  51.  
  52.  
  53. static struct MachineDriver machine_driver_minivadr =
  54. {
  55.     /* basic machine hardware */
  56.     {
  57.         {
  58.             CPU_Z80,
  59.             24000000 / 6,         /* 4 Mhz ? */
  60.             readmem, writemem, 0, 0,
  61.             interrupt, 1
  62.         }
  63.     },
  64.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  65.     1,                    /* single CPU, no need for interleaving */
  66.     0,
  67.  
  68.     /* video hardware */
  69.     256, 256, { 0, 256-1, 16, 240-1 },
  70.     0,
  71.     2, 0,
  72.     minivadr_init_palette,
  73.  
  74.     VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY,
  75.     0,
  76.     0,
  77.     0,
  78.     minivadr_vh_screenrefresh,
  79.  
  80.     /* sound hardware */
  81.     0, 0, 0, 0
  82. };
  83.  
  84.  
  85. /***************************************************************************
  86.  
  87.   Game driver(s)
  88.  
  89. ***************************************************************************/
  90.  
  91. ROM_START( minivadr )
  92.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  93.     ROM_LOAD( "d26-01.bin",    0x0000, 0x2000, 0xa96c823d )
  94. ROM_END
  95.  
  96.  
  97. GAME( 1990, minivadr, 0, minivadr, minivadr, 0, ROT0, "Taito Corporation", "Minivader" )
  98.